﻿
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;

namespace Demo.Models
{
    /// <summary>
    /// 组织结构
    /// </summary>
    [Description("组织结构")]
    public class Organizer : BaseEntity<long>
    {

        public Organizer()
        { 
            BaseUsers = new List<BaseUser>();
            MicroSites = new List<MicroSite>();
            Exhibitions = new List<Exhibition>();
        }

        /// <summary>
        /// 名称
        /// </summary>
        /// <value>The name.</value>
        public string Name { get; set; }

        /// <summary>
        /// 负责人
        /// </summary>
        public string LinkMan { get; set; }
        /// <summary>
        /// 负责人手机
        /// </summary>
        public string LinkMobile { get; set; }
        /// <summary>
        /// 机构固定电话
        /// </summary>
        public string Tel { get; set; }

        /// <summary>
        /// 传真
        /// </summary>
        public string Fax { get; set; }


        /// <summary>
        /// 组织结构也使用树形结构
        /// </summary>
        public Nullable<long> ParentId { get; set; }

        public int Level { get; set; }

        public bool Expanded { get; set; }

        public bool IsLeaf { get; set; }

        public bool Loaded { get; set; }
         
        /// <summary>
        /// logo图像的url
        /// </summary>
        /// <value>The logo path.</value>
        public string LogoPath { get; set; }
         
        public virtual ICollection<BaseUser> BaseUsers { get; set; }

        public virtual ICollection<MicroSite> MicroSites { get; set; }
         
        public virtual ICollection<Exhibition> Exhibitions { get; set; }

        public virtual ICollection<WeChat> WeChats { get; set; }


        public virtual Organizer Parent { get; set; }

        public virtual ICollection<Organizer> Organizers { get; set; }
         
    }
}
